This release features the use of Direct3D HLSL shaders to handle many of the rendering tasks.  At least shader model 2.0 compliance is required.  This was necessary because a lot of the software Quake features were really pixel shaders in disguise, and were difficult to reproduce in hardware otherwise (at least without substantial performance loss).

If your card supports pixel shaders but not vertex shaders, Direct3D will quite happily emulate vertex shaders in software with a surprisingly high level of performance - at least as good as the fixed pipeline.  "Behind the scenes" optimisations of the programmable pipeline may make them even faster.  The ability to use simpler and cleaner code paths in the engine will boost performance yet again.

NO NEW EFFECTS ARE USED.

This is a straight-up replication of the original software Quake effects.  I have little inclination to design new effects; they may look nice, but they don't look like Quake.

You can replace the shaders hard-coded into the engine with your own if you wish.  Create a folder under C:\Quake\ID1 (or whereever you have Quake installed to) called "shaders" and put your new shaders there.  I recommend copying the shaders from the engine source distribution to use as a baseline - that way you'll stand a better chance of getting things set up the way DirectQ expects them.

I won't provide further info or documentation on what the hard-coded shaders are called or how they work; if you can't figure this out from the code you really have no business replacing them.  Also, it's not my job here to provide a HLSL tutorial; there are plenty of resources on the web and in the DirectX SDK - it's how I learned them, after all!

One warning - this is NOT a generic scene graph application.  It's a game engine.  Some things need to be well-defined and/or tightly constrained as a result.  The hard-coded shaders expect certain parameters, certain techniques and certain numbers of passes to be present, and any replacement shaders you provide should conform to this expectation.  I check these at run time and spam the console with error messages if anything is wrong, so you should know quickly enough if anything you do is not in order.


A note on Shader Precision
==========================
Direct3D allows you to specify use of either full or partial precision when loading and compiling a shader.  In most cases partial precision is perfectly good enough, and will give good performance.  However, NVIDIA use 16-bit floats for partial precision, whereas other manufacturers use 24-bit floats.  In one specific case, a 16-bit float is not good enough, and this is water warp surfaces where a sin function is used in the shader.

To enable you to choose performance or quality, two options are available in the "Video and View" menu for default surface precision and warp surface precision.  These options work the same way, and have 3 settings: Auto-Detect, Partial or Full.

"Auto-Detect" will set full precision for water warp surfaces (only) if (and only if) an NVIDIA card is detected during setup; otherwise it will set partial precision for everything.  "Partial" will force partial precision for everything, irrespective of the card detected, and "Full" will force full precision for everything irrespective of the card detected.

For the best balance of performance and quality it is recommended that you leave these at "Auto-Detect".

These are NOT startup-only options, you can switch them at any time while the game is running.  The change is immediate.
